import java.util.Scanner;
import java.util.Stack;

public class An_Qution {
    public static void main(String[] args) {
        Stack<Integer> A = new Stack<>();
        Scanner read = new Scanner(System.in);
        int n = read.nextInt();
        A.push(3);
        A.push(8);
        while(n >= 3)
        {
            int num1 = A.pop();
            int num2 = A.peek();
            A.push(num1);
            A.push(2 * num1 + 2 * num2);
            n--;
        }
        if(n == 1)
            A.pop();
        System.out.println(A.peek());
    }
}
